﻿using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Xfm.Core
{
    public class App
    {
        public static IServiceCollection Services = null;
        public static Type DbContextType = null;
        public static Type AppUserType = null;
        public static IHttpContextAccessor HttpContextAccessor = null;
        public static T GetRequiredService<T>()
        {
            return HttpContextAccessor.HttpContext.RequestServices.GetRequiredService<T>();
        }
    }
}
